import React from 'react'
import { Row, Col, Cascader, Table, Button } from 'antd';
import '../../../assets/css/Sale/AddOrder/SelectItem.sass';


const options = [
    {
        value: 'zhejiang',
        label: 'Zhejiang',
    },
    {
        value: 'jiangsu',
        label: 'Jiangsu',
    },
];


const columns = [
    {
        title: '商品名称',
        dataIndex: 'address',
    },
    {
        title: '大单位',
        dataIndex: 'number',
    },
    {
        title: '大单位单价',
        dataIndex: 'address',
    },
    {
        title: '小单位',
        dataIndex: 'address',
    },
    {
        title: '小单位价格',
        dataIndex: 'address',
    },
    {
        title: '现有库存',
        dataIndex: 'number',
    },
    {
        title: '操作',
        dataIndex: 'aaa',
    },
];

const data = [];

for (let i = 0; i < 7; i++) {
    data.push({
        key: i,
        name: 11,
        age: 32,
        address: `1234`,
        number: 1,
        aaa: <div id='Operation'>
            <Button type="text" className='tableOperation'>添加</Button>
            <Button type="text" className='tableOperation'>赠品</Button>
        </div>
    });
}


function SelectItem() {
    return (
        <div id='Item'>
            <Row className='Addbasic'>
                <Col span={6}>
                    <span>选择商品：</span>
                </Col>
            </Row>
            <div className='AddInfor'>
                <Row>
                    <Col span={6}>
                        <span>选择品牌：</span>
                        <Cascader options={options} />
                    </Col>
                    <Col span={6}>
                        <span>选择分类：</span>
                        <Cascader options={options} />
                    </Col>
                    <Col span={6}>
                        <span >商品标题：</span>
                        <Cascader options={options} />
                    </Col>
                    <Col span={6}>
                        <Button>搜索</Button>
                    </Col>
                </Row>
            </div>
            <div className='SelectContent'>
                <Row>
                    <Col span={6}>
                        <span>搜索结果</span>
                    </Col>
                </Row>
                <Table columns={columns} dataSource={data} />
            </div>

        </div>
    )
}

export default SelectItem